
import {UserModel} from "../Model/userModel.js"
export const addUserDao =async (user) => {
    return await UserModel.insertOne(user);
}

export const updateUserDao = async (username,updateObj)=>{
    return await UserModel.findOneAndUpdate({
        username
    },{
        $set:{...updateObj}
    },{new:true})
}
export const findUserByIdDao = async (userId)=>{
    return await UserModel.findById(userId)
}











